<script setup lang="ts">
import { useToggleTheme } from '../../../hooks'
import useConfigStore from '../../../store/config'

const configStore = useConfigStore()

function changeColor(color: any) {
  useToggleTheme(color)
  configStore.setThemeColor(color)
}
</script>

<template>
  <ElColorPicker
    :model-value="configStore.getThemeColor"
    @change="changeColor"
  />
</template>
